package cn.iocoder.yudao.module.infra.convert.infotablecollect;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;

import cn.iocoder.yudao.module.infra.dal.dataobject.codegen.CodegenTableDO;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import cn.iocoder.yudao.module.infra.controller.admin.infotablecollect.vo.*;
import cn.iocoder.yudao.module.infra.dal.dataobject.infotablecollect.InfoTableCollectDO;

/**
 * 基础资料表汇总 Convert
 *
 * @author lry
 */
@Mapper
public interface InfoTableCollectConvert {

    @Mappings({
            @Mapping(source = "name", target = "tableName"),
            @Mapping(source = "comment", target = "tableComment"),
    })
    InfoTableCollectDO convert(TableInfo bean);

    InfoTableCollectConvert INSTANCE = Mappers.getMapper(InfoTableCollectConvert.class);

    InfoTableCollectDO convert(InfoTableCollectCreateReqVO bean);

    InfoTableCollectDO convert(InfoTableCollectUpdateReqVO bean);

    InfoTableCollectRespVO convert(InfoTableCollectDO bean);

    List<InfoTableCollectRespVO> convertList(List<InfoTableCollectDO> list);

    PageResult<InfoTableCollectRespVO> convertPage(PageResult<InfoTableCollectDO> page);

    List<InfoTableCollectExcelVO> convertList02(List<InfoTableCollectDO> list);

}
